/*
    created: 2023/4/12
    filename: Main.c
    author: 李东霖
    purpose：带头结点链队列操作的测试 
*/

#include"listqueue.h"
int main()
{
    PListQueue q = InitQueue1();
    if(q == NULL) return -1;
    for(int i = 0; i!= 5;++i)
    {
        enQueue(q,&i);
    }
    DispQueue(q);
    printf("\nlength = %d\n",LengthQueue(q));

    ElemType elem = 100;
    enQueue(q,&elem);
    DispQueue(q);
    printf("\n");
    deQueue(q,&elem);

    deQueue(q,&elem);

    printf("length = %d \n",LengthQueue(q));
    DispQueue(q);
    printf("\n elem = %d\n",elem);


    GetHeadQueue(q,&elem);
    printf(" elem = %d\n",elem);
    ClearQueue(q);
    printf("length = %d \n",LengthQueue(q));
    enQueue(q,&elem);
    DispQueue(q);





    return 0;
}